home *** CD-ROM | disk | FTP | other *** search
/ Hyper Stacks 1994 May / Hyper Stacks (Pacific HiTech)(1994)[Mac].iso / Utilities / File catalog example / card_2986.txt < prev    next >
Encoding:
Text File  |  1987-09-02  |  4.2 KB  |  174 lines

  1. -- card: 2986 from stack: in
  2. -- bmap block id: 9462
  3. -- flags: 4000
  4. -- background id: 2784
  5. -- name: Title
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: 2000
  11. -- rect: left=423 top=76 right=109 bottom=457
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 27009 / 27009
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: First file
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   go to card "Specimen"
  23. end mouseUp
  24.  
  25.  
  26.  
  27. -- part 2 (button)
  28. -- low flags: 00
  29. -- high flags: A003
  30. -- rect: left=380 top=138 right=166 bottom=470
  31. -- title width / last selected line: 0
  32. -- icon id / first selected line: 0 / 0
  33. -- text alignment: 1
  34. -- font id: 0
  35. -- text size: 12
  36. -- style flags: 0
  37. -- line height: 16
  38. -- part name: Load data
  39. ----- HyperTalk script -----
  40. on mouseUp
  41.   ask "Where is the list of file information?"
  42.   if it is empty then exit mouseUp -- cancelled
  43.   put it into infile -- save filename
  44.   open file infile -- open it
  45.   push this card -- save location of title card
  46.   go to card "Specimen" -- go to specimen card
  47.   show msg -- give some feedback
  48.   set lockscreen to true -- don't waste time with screen updates
  49.   repeat while true -- read the whole input file
  50.     read from file infile until return -- one line at a time
  51.     if it is empty then -- until we run out of lines
  52.       close file infile -- then close the file
  53.       set lockscreen to false
  54.       hide msg
  55.       pop card -- and restore the screen
  56.       exit mouseUp
  57.     end if
  58.     put it into rec -- for each line read
  59.     doMenu "New Card" -- create a new card
  60.     put item 1 of rec into msg -- note where we are in processing
  61.     put item 1 of rec into field 1 -- and parse the comma-separated
  62.     put item 2 of rec into field 2 -- input fields into the card
  63.     put item 3 of rec into field 3
  64.     put item 4 of rec into field 4
  65.     put item 5 of rec into field 5
  66.     put item 6 of rec into field 6
  67.     put item 7 of rec into field 7
  68.     put item 8 of rec into field 8
  69.   end repeat
  70. end mouseUp
  71.  
  72.  
  73.  
  74. -- part 5 (button)
  75. -- low flags: 00
  76. -- high flags: A003
  77. -- rect: left=23 top=272 right=296 bottom=110
  78. -- title width / last selected line: 0
  79. -- icon id / first selected line: 0 / 0
  80. -- text alignment: 1
  81. -- font id: 0
  82. -- text size: 12
  83. -- style flags: 0
  84. -- line height: 16
  85. -- part name: Delete data
  86. ----- HyperTalk script -----
  87. on mouseUp
  88.   Answer "Do you really want to delete all your stuff?" with "Cancel" or "OK"
  89.   if it is not "OK" then exit MouseUp
  90.   push this card -- remember title card location
  91.   go to card "Specimen" -- go to specimen card
  92.   go next card -- go to first card to be deleted
  93.   repeat while the number of this card is not 1
  94.     doMenu "Delete Card" -- and trash everything until we get back
  95.   end repeat -- to the first card
  96.   pop card -- restore location
  97. end mouseUp
  98.  
  99.  
  100.  
  101. -- part 6 (button)
  102. -- low flags: 00
  103. -- high flags: A003
  104. -- rect: left=382 top=183 right=213 bottom=470
  105. -- title width / last selected line: 0
  106. -- icon id / first selected line: 0 / 0
  107. -- text alignment: 1
  108. -- font id: 0
  109. -- text size: 12
  110. -- style flags: 0
  111. -- line height: 16
  112. -- part name: Sort files
  113. ----- HyperTalk script -----
  114. on mouseUp
  115.   sort by field 1
  116. end mouseUp
  117.  
  118.  
  119.  
  120. -- part 7 (field)
  121. -- low flags: 01
  122. -- high flags: 0000
  123. -- rect: left=362 top=29 right=44 bottom=497
  124. -- title width / last selected line: 0
  125. -- icon id / first selected line: 0 / 0
  126. -- text alignment: 0
  127. -- font id: 3
  128. -- text size: 12
  129. -- style flags: 0
  130. -- line height: 16
  131. -- part name: 
  132.  
  133.  
  134. -- part 8 (button)
  135. -- low flags: 00
  136. -- high flags: 8003
  137. -- rect: left=354 top=271 right=297 bottom=473
  138. -- title width / last selected line: 0
  139. -- icon id / first selected line: 0 / 0
  140. -- text alignment: 1
  141. -- font id: 0
  142. -- text size: 12
  143. -- style flags: 0
  144. -- line height: 16
  145. -- part name: Documentation
  146. ----- HyperTalk script -----
  147. on mouseUp
  148.   go to card "Documentation"
  149. end mouseUp
  150.  
  151.  
  152.  
  153. -- part 10 (button)
  154. -- low flags: 00
  155. -- high flags: 2000
  156. -- rect: left=387 top=76 right=109 bottom=421
  157. -- title width / last selected line: 0
  158. -- icon id / first selected line: 9301 / 9301
  159. -- text alignment: 1
  160. -- font id: 0
  161. -- text size: 12
  162. -- style flags: 0
  163. -- line height: 16
  164. -- part name: Last file
  165. ----- HyperTalk script -----
  166. on mouseUp
  167.   go to last card
  168. end mouseUp
  169.  
  170.  
  171.  
  172. -- part contents for card part 7
  173. ----- text -----
  174.